package com.itheima;

import java.net.InetAddress;
import java.net.UnknownHostException;

/**
 * @auther Macrydy
 * @date 2020/7/10 18:18
 */
public class InetAddressDemo {
    public static void main(String[] args) throws UnknownHostException {
        InetAddress name = InetAddress.getByName("192.168.95.39");
        System.out.println(name);


        System.out.println(name.getHostName());
        System.out.println(name.getHostAddress());
    }
}
